package com.itcast.dao;

import com.itcast.pojo.Order;
import com.itcast.pojo.Setmeal;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;

public interface OrderDao {
    @Select("select * from t_order where orderDate = #{orderDate}")
    Setmeal findSetmealByDate(@Param("orderDate") Date orderDate);

    Order findByOrder(Order order);

    void addOrder(Order order);
    @Select("select * from t_order where id = #{id}")
    Order findById(@Param("id") int id);
    @Select("select * from t_order where setmeal_id = #{setmealId}")
    Order findBySetmealId(@Param("setmealId") int setmealId);
}
